home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Text-Viewer / MSWordView / mswordview_src / helper-scripts / mswordview.wrapper next >
Encoding:
Text File  |  1999-11-06  |  805 b   |  41 lines

  1. #!/bin/sh
  2. #
  3. #    mswordview.wrapper
  4. #
  5. #    Copyright 1998 Jager Enterprises and Todd Stiers
  6. #
  7. #    Run mswordview directly from X Netscape
  8. #
  9. #    T.Stiers        19980531    
  10. #
  11. #    Documentation:
  12. #
  13. #    Warning: You will need to link DOCUMENTROOT/tmp to /tmp
  14. #    to work using the current paths. Doing so might pose a 
  15. #    security issue. This whole CGI is a security issue
  16. #
  17. #    This application should be added to X netscape as
  18. #
  19. #    MIMEType    : application/msword
  20. #    Suffix      : .doc
  21. #    Application : /usr/local/bin/mswordview.wrapper %s
  22. #
  23. PATH=/bin:/usr/bin:/usr/local/bin
  24.  
  25. HTML=/tmp/mswordview.$$.html
  26.  
  27. #
  28. #    run mswordview program
  29. #
  30. mswordview "$*" > $HTML
  31.  
  32. #
  33. #    point netscape to the mswordview generated html file
  34. #
  35. netscape4 -remote 'openUrl(http://localhost'$HTML')'
  36.  
  37. #
  38. #    remove files within 30 seconds
  39. #
  40. (sleep 30; rm -f $HTML)&
  41.